package com.aurora.blog.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.aurora.common.core.annotation.Excel;
import com.aurora.common.core.web.domain.BaseEntity;

/**
 * 点赞对象 blog_likes
 * 
 * @author aurora
 * @date 2024-06-04
 */
public class BlogLikes extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 点赞ID */
    private Long likeId;

    /** 点赞的用户ID，关联到Users表的user_id */
    @Excel(name = "点赞的用户ID，关联到Users表的user_id")
    private Long userId;

    /** 被点赞的文章ID，关联到Posts表的post_id */
    @Excel(name = "被点赞的文章ID，关联到Posts表的post_id")
    private Long postId;

    /** 点赞时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "点赞时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    public void setLikeId(Long likeId) 
    {
        this.likeId = likeId;
    }

    public Long getLikeId() 
    {
        return likeId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setPostId(Long postId) 
    {
        this.postId = postId;
    }

    public Long getPostId() 
    {
        return postId;
    }
    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("likeId", getLikeId())
            .append("userId", getUserId())
            .append("postId", getPostId())
            .append("createdAt", getCreatedAt())
            .toString();
    }
}
